package com.yz.rabbitmqspring;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

@SpringBootApplication
public class RabbitmqSpringApplication {

    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        SpringApplication.run(RabbitmqSpringApplication.class, args);

        Order order = new Order("zhangsan");
        Class<? extends Order> orderClass = order.getClass();
        Method print = orderClass.getMethod("print",String.class);
        print.invoke(order,"hello");
    }

}
